import java.awt.image.BufferedImage;
import java.util.HashMap;
import java.util.Iterator;

public class Map {
	private int[][] mapData;
	private BufferedImage mapImage;
	private String[] enemies;
	private int warpLevel;
	private String[] itemSale;
	private String[] equipSale;
	private HashMap<String, Integer> abilities;
	public Map(int[][] mapData, BufferedImage mapImage, String[] enemies, 
			String[] equipSale, String[] itemSale, HashMap<String, Integer> abilities, int warpLevel){
		this.abilities = abilities;
		this.mapData = mapData;
		this.mapImage = mapImage;
		this.enemies = enemies;
		this.warpLevel = warpLevel;
		this.itemSale = itemSale;
		this.equipSale = equipSale;
	}
	public BufferedImage image(){
		return mapImage;
	}
	public int typeAt(int i, int j){
		return mapData[i][j];
	}
	public int numEnemies() {
		return enemies.length;
	}
	public int getWarpLevel(){
		return warpLevel;
	}
	public String[] itemsForSale(){
		return itemSale;
	}
	public String[] equipsForSale(){
		return equipSale;
	}
	public String getEnemy(int enm) {
		return enemies[enm];
	}
	public String[] getAbilities(){
		String[] abils = new String[abilities.size()];
		Iterator<String> it = abilities.keySet().iterator();
		int count = 0;
		while(it.hasNext()){
			abils[count] = it.next();
			count++;
		}
		return abils;
	}
	public int abilitySale(String ability){
		return abilities.get(ability);
	}
}
